package com.hxl.aop.entity;

import cn.hutool.core.util.DesensitizedUtil;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.hxl.aop.res.Sensitive;
import com.hxl.aop.res.enums.DesensitizedType;
import com.hxl.aop.res.enums.SensitiveEnum;
import lombok.Data;

@Data
public class UserEntity {

    /**
     * 用户ID
     */
    @Sensitive(desensitizedType = DesensitizedType.USER_ID)
    private String userId;

    /**
     * 用户姓名
     */
    @Sensitive(desensitizedType = DesensitizedType.USERNAME)
    private String name;

    /**
     * 密码
     */
    @Sensitive(desensitizedType = DesensitizedType.PASSWORD)
    private String password;

    /**
     * 手机号
     */
//    @SensitiveWrapped(SensitiveEnum.MOBILE_PHONE)
    @Sensitive(desensitizedType = DesensitizedType.PHONE)
    private String mobile;

    /**
     * 身份证号码
     */
//    @SensitiveWrapped(SensitiveEnum.ID_CARD)
    @Sensitive(desensitizedType = DesensitizedType.ID_CARD)
    private String idCard;

    /**
     * 年龄
     */
    private String sex;

    /**
     * 性别
     */
    private int age;
}